#include <iostream>
using namespace std;

class MyClass {
	private:
		int secretValue;
	public:
		MyClass(int value): secretValue(value) {}
		friend int getSecretValue(const MyClass &obj);
};

int getSecretValue(const MyClass &obj) {
	return obj.secretValue;
}

int main() {
	MyClass myObject(42);
	cout << "Secret Value!" << getSecretValue(myObject) << endl;
	return 0;
}